<%@page language="java" pageEncoding="UTF-8"%>
<%@page contentType="text/html; charset=utf-8"%>
<%@page import="com.mysql.jdbc.Driver"%>
<%@page import="java.sql.*"%>
<%
request.setCharacterEncoding("UTF-8");

String userName="root";
String userPassword="";
String dbName="a0713225307";

//String una=request["una"];
String unam=request.getParameter("una");


 String sql="delete from users where uName="+unam;
     sql = sql.replaceAll("\r|\n", "");
    // System.out.println(sql);

	Class.forName("com.mysql.jdbc.Driver").newInstance();
	String u="jdbc:mysql://localhost/"+dbName+"?user="+userName+"&password="+userPassword+"&useUnicode=true&characterEncoding=UTF-8";
	
	java.sql.Connection connection=java.sql.DriverManager.getConnection(u,userName,userPassword);
   
	Statement statement=connection.createStatement();

	try{
	statement.executeUpdate(sql);
	
	if(statement!=null){
		statement.close();
	}
	
	if(connection!=null){
		connection.close();
	}
	}catch(Exception e){
		System.out.println(e.getMessage());
	}
%>
